package com.ruoyi.system.utils;

import cn.hutool.core.collection.CollectionUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class TransData {
	
	static List<String> areaNames = new ArrayList<>(Arrays.asList("辽宁省", "沈阳", "大连", "鞍山", "抚顺", "本溪", "丹东", "锦州", "营口", "阜新", "辽阳", "盘锦", "铁岭", "朝阳", "葫芦岛"));
	
	public static String transCityMap(String depName){
		
		for(String areaName : areaNames){
			if(depName.contains(areaName)){
				return areaName;
			}
		}
		return "无访问权限";
	}

	public static boolean existCityName(String cityName){
		return CollectionUtil.contains(areaNames,cityName);
	}
	
	public static boolean containsCityName(String depName){
		
		for(String areaName : areaNames){
			if(depName.contains(areaName)){
				return true;
			}
		}
		return false;
	}

}
